package com.mdhw.common.enums;

import lombok.Getter;

/**
 * @author zhouxt
 */
@Getter
public enum MessageEnum {


    SUCCESS(0,"操作成功！"),
    ERROR(-1,"操作失败！"),
    /**
     * 账号问题
     */
    AUTH_REQUEST_ERROR(301, "用户名或密码错误"),

    AUTH_STOP_ERROR(302, "用户已停用"),

    /**
     * 权限校验
     */
    TOKEN_ERROR(401, "身份过期，请重新登录"),
    AUTH_REQUEST_LOCKED(402, "该账号已被冻结"),
    NO_ACCOUNT(451,"账号不存在！"),
    NO_INTERFACE_PERMISSION(461,"暂无接口访问权限"),
    /**
     * 通用错误
     */


    NOT_FIND_FILE(510,"文件未找到!"),
    MAKE_DIR_ERROR(511,"生成文件夹错误！"),
    UPLOAD_FILE_ERROR(512,"上传文件错误！"),
    UPLOAD_FILE_NULL_ERROR(513,"上传文件大小为0！"),
    UPLOAD_FILE_TYPE_ERROR(514,"上传文件类型非法！"),
    UPLOAD_FILE_SIZE_ERROR(515,"上传文件大小超过限制！"),
    IMAGE_SAVE_ERROR(516,"图片生成错误！"),
    UPDATE_NOT_HAVE_ID(531, "修改数据id不能为空！"),
    EXISTS(532,"数据已存在！"),
    PAGE_PARMS_ERROR(533,"分页参数错误，pageNo必须>=1！"),
    PARMS_ERROR(534, "缺少必要参数！"),

    EMPTY(1001, "数据不存在"),
    VALIDATE_ERROR(1002, "表单校验失败"),
    DUPLICATE_POST_ERROR(1003, "重复提交数据"),
    OPERATION_ERROR(1004,"操作有误，请重试"),
    ;

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code;

    public String message;
}
